﻿<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<HTML xmlns="http://www.w3.org/1999/xhtml">
<HEAD>
<META http-equiv=Content-Type content="text/html; charset=utf-8">
<TITLE> <? echo $title;?> </TITLE>
<base href="<?php echo base_url() ?>" />
<LINK href="images/default_1.css" type="text/css" rel=stylesheet>
<SCRIPT src="js/common.js" type="text/javascript"></SCRIPT>
<SCRIPT src="js/jquery.min.js" type="text/javascript"></SCRIPT>
<script src="js/jquery.form.js" type="text/javascript"></script>
<SCRIPT src="js/WebCalendar.js" type="text/javascript"></SCRIPT>
<SCRIPT type="text/javascript">
 function getReqID(){
      var str = window.prompt("请输入调单号（如：200911）","");
      if(str==null){
          str="";//判断用户取消行为
      }else{
      if(str.length<5){
          str="";
          alert("对不起，你输入的字符长度有误！")
      }
    }
      if(str!=""){
      var data_url= '<?php echo site_url("main/getSimpleReqID") ?>'+"/"+str;
     // alert(data_url);
      $.ajax({  //调用Juqery Ajax
      type: "POST",
      url: data_url,
      timeout: 1500,
      error:function(){alert("服务器返回出错！");},
      success: function(msg){
          $('#req_id_').html("<img src=\"images/loading.gif\" /><span class=\"about_content_title\"> 正在提交请求.</span>");
          $('#req_id').val(msg);
          $('#req_id_').html("<a onclick='getReqID()'><img src='images/insert.gif'  border='0' />快速输入</a>（如200911）");
      }
        });
    }
 }
 function chk_form(){
                        if(
                            $('#req_id').val()!=''
                            ||$('#draft').val()!=''
                            ||$('#router').val()!=''
                            ||$('#send').val()!=''
                            ||$('#notify').val()!=''
                            ||$('#mon').val()!=''
                            ||$('#type').val()!=''
                            )
                        {
							return true;
						}else{
                            $('#msgs').html("<span class=\"about_content_title\">不能全部为空，请任意输入一项！</span>");
                            $('#req_id').focus();
                            return false;
                        }
					}
</SCRIPT>
</HEAD>
<BODY topMargin=10>
<TABLE cellSpacing=6 cellPadding=2 width="100%" border=0>
  <TBODY>
  <TR>
    <TD>
      <TABLE class=guide cellSpacing=0 cellPadding=0 width="100%" border=0>
        <TBODY>
        <TR>
          <TD><A href="<?php echo site_url("main/Vmain"); ?>" target="main">系统首页</A>&nbsp;» 调单查询</TD>
        </TR></TBODY></TABLE>
      <BR>
       <FORM id="myform" name="myform" method="post" ACTION="<?php echo site_url("main/req_find_rst") ?>" ONSUBMIT="return chk_form()">
        <table class="tableborder" width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr class="header">
          <td colspan="2">调单查询</td>
        </tr>
        <tr class="altbg1">
          <td width="100">调单号：            </td>
          <td><input type="text" name="req_id" id="req_id" size="30">&nbsp;<span id="req_id_" style="margin-top:12px;margin-bottom:5px;font-size:13px;color: #C62E25;"><a onclick="getReqID()"><img src="images/insert.gif"  border="0" />快速输入</a>（如200911）</span></td>
        </tr>
         <tr class="altbg1">
          <td>拟稿人：            </td>
          <td><input type="text" name="draft" id="draft" size="30"></td>
        </tr>
         <tr class="altbg1">
          <td>路由信息：            </td>
          <td><input type="text" name="router" id="router" size="30"></td>
        </tr>
         <tr class="altbg1">
          <td>主送：            </td>
          <td><input type="text" name="send" id="send" size="30"></td>
        </tr>
        <tr class="altbg1">
          <td>通知时间：            </td>
          <td><input type="text" name="notify" id="notify" size="30"  onClick="return SelectDate(this,'yyyy-MM-dd');" readonly></td>
        </tr>
          <tr class="altbg1">
          <td>归档月份：            </td>
          <td>
          <input type="text" name="mon" id="mon" size="30"  onClick="return SelectDate(this,'yyyyMM');"  readonly>
          </td>
         </tr>
        <tr class="altbg1">
          <td>调单类型：            </td>
          <td>
          <select name="type" id="type" >
          <option value="" selected>[-请选择-]</option>
           <?php
            if(isset($type)) {
        	foreach ($type->result() as $row) {
              echo" <option value='$row->type_id'>$row->type</option>"; }
            }
           ?>
           </select>
          </td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td><input class="submit" type=submit value="提 交" name=submit>&nbsp;&nbsp;&nbsp;&nbsp;
            <input id="reset" type="reset"value="清除全部" name="reset" onclick="$('#msgs').html('');">
          </td>
        </tr>
        <tr>
          <td></td>
          <td >
          <div id="msgs" style="margin-top:12px;margin-bottom:5px;font-size:13px;color: #C62E25;font-weight:bold;"></div>
          </td>
       </tr>
      </table>
      </FORM></TD></TR></TBODY></TABLE><BR><BR>
      <br/><br/>
      <DIV class=footer>
        <HR width="80%" color=#9db3c5 noShade SIZE=0>
         Powered by <? echo $copyright ?> <em>,</em> <B><A style="COLOR: #666" href="<? echo base_url() ?>" target="_blank"><? echo $version;?>.</A></B>
      </DIV>
